<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../plugins/layui/css/layui.css" media="all" />
	</head>

	<body>
<form class="layui-form" action="" method="post">
  <div class="layui-form-item">
    <label class="layui-form-label">系统名称</label>
    <div class="layui-input-block">
      <input type="text" name="siteName" required  lay-verify="required" placeholder="请输入系统名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
  
</form>
 <script type="text/javascript" src="../../plugins/layui/layui.js"></script>
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});
</script>
</body>
</html>